export class Contact {
    eMail = ""
    phoneNumber = ""
    wechatNumber = ""
    qqNumber = ""

    constructor(email = "", phoneNumber = "", wechatNumber = "", qqNumber = ""){
        this.eMail = email
        this.phoneNumber = phoneNumber
        this.qqNumber = qqNumber
        this.wechatNumber = wechatNumber
    }
    static isValid(obj){
        let valid = true;
        valid &= obj.eMail != null;
        valid &= obj.phoneNumber != null;
        valid &= obj.wechatNumber != null;
        valid &= obj.qqNumber != null;

        if (!valid)
          console.error(
            "Object must be contain {email, phoneNumber, wechatNumber, qqNumber} membres"
          );

        return valid == 1 ? true : false;
    }
}